<template>
    <van-nav-bar title="商品列表" left-text="返回" left-arrow @click-left="()=>{$router.back()}" fixed/>
        <div style="height: 45px;"></div>
    <div v-for="i in data">
        <router-link :to="`/xq/${i.goods_id}`">
            <van-card :price="i.goods_price" :title="i.goods_name"
                :thumb="i.goods_big_logo ? i.goods_big_logo : 'https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg'" />
        </router-link>

    </div>
</template>

<script setup>

import { searchApi } from '@/api/api'
import { ref } from 'vue';
let data = ref([])
searchApi().then(res => {
    console.log(res);
    data.value = res.data.message.goods
})
</script>

<style lang="scss" scoped></style>